<template>
    <div>
        <!-- <p>{{ count }}</p>
        <h1 v-if="count > 5">标题一</h1>
        <h2 v-else-if="count > 0">标题二</h2>
        <h3 v-else>标题三</h3>
        <button @click="count++">+1</button> -->

        <template v-if="count > 0">
            <h1>标题</h1>
            <p>段落内容</p>
        </template>
    </div>
</template>

<script setup>
import { ref } from 'vue';

const count = ref(0);
</script>

<style scoped></style>